In order to optimize the operating conditions of an integrated circuit, such as a microprocessor, it is often desirable to measure the current used by the circuit. The standard method for measuring a current is to send the current through a sense resistor of known value while measuring the voltage drop across the resistor. From the known resistance and the measured voltage, one may calculate the current load using Ohm's law (I=V/R).
It is important to get an accurate voltage measurement so that the current can be precisely measured. One method of measuring voltage in a digital circuit uses a voltage controlled oscillator (VCO). When a voltage to be measured is applied to the control input of the VCO, the output of the VCO produces a series of pulses. A counter can be coupled to the VCO output and may count the VCO output pulses for a fixed interval. The VCO output frequency can then be correlated to a known input voltage, thereby determining the value of the unknown input voltage. However, the accuracy of this method may vary because the voltage versus frequency relationship for the VCO is not linear. The gain of the VCO may vary with voltage, temperature, age and other parameters. Therefore, the output count for a particular input voltage will vary for different operating conditions.